local MainScene = Class("lua/cc/clsScene.lua"):Inherit()

function getClass()
	return MainScene
end

function MainScene:init()
	--self:goStart()
end


function MainScene:goStart()
	------------------------------------------------------------------
	--local audioManager = Class("lua/game/clsAudioManager.lua"):getInstance() --预加载资源
	local gameWorld = Class("lua/game/clsGameWorld.lua"):getInstance()
	local gameScene = Class("lua/game/clsGameScene.lua"):New(self)
	gameWorld:addChild(gameScene)
	-------------------------------------------------------------------
	
	--[[local a = loadfile("lua/Profiler.lua")
	local t = {}
	setfenv(a, t)()
	setmetatable(t, {__index = _G})
	t.doA()
	
	local b = loadfile("lua/Profiler.lua")
	setfenv(b, t)()
	setmetatable(t, {__index = _G})
	t.doA()--]]
	
	
	--[==[
	--------------getRunningScene()---------------
	local pDirector = CCDirector:sharedDirector()
	local scene = pDirector:getRunningScene()
	scene = Class("lua/cc/clsScene.lua"):Attach(scene)
	----------------------------------------------

	--[[local a = NewImport("lua/Debug.lua", false)
		a.doSth()
	local function press()
		local a = NewImport("lua/Debug.lua", true)
		a.doSth()
	end
	
	local btn = createButton(scene, {x = display.x, y = display.y, res = 'bb.9.png', event = {up = press}})--]]
	
	 MOD_DEBUG.doSth()
	local function press()
		package.loaded["lua/Debug"] = nil
		MOD_DEBUG = require("lua/Debug")
		 MOD_DEBUG.doSth()
	end
	local btn = createButton(scene, {x = display.x, y = display.y, res = 'bb.9.png', event = {up = press}})
	
	]==]
end
